﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Cn.Cellula.Website.Admin.Content.Log.List" Title="查看日志" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_PageTitle" runat="server">
查看日志
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_MainBody" runat="server">
    <fieldset>
        <legend>查询</legend>
        <table border="0" cellpadding="0" cellspacing="0" class="query_table">
            <tr>
                <td class="query_title">
                    类型：
                </td>
                <td class="query_content">
                    <asp:DropDownList runat="server" ID="ddl_Type"></asp:DropDownList>
                </td>
                <td class="query_title">
                    内容包含：
                </td>
                <td class="query_content">
                    <asp:TextBox ID="txt_Name" runat="server" MaxLength="50"></asp:TextBox>
                </td>
                <td class="query_title">
                    操作者：
                </td>
                <td class="query_content">
                    <asp:TextBox ID="txt_Operator" runat="server" MaxLength="50"></asp:TextBox>
                </td>
             </tr>
             <tr>
                <td class="query_title">
                    IP：
                </td>
                <td class="query_content">
                    <asp:TextBox ID="txt_FromIP" runat="server" MaxLength="50"></asp:TextBox>
                </td>
                <td class="query_title">
                    日志时间：
                </td>
                <td class="query_content">
                    <asp:TextBox runat="server" ID="txt_StartDate" Width="80px" onclick="jskitDateSelector.open(this,event)"></asp:TextBox>
                    --
                    <asp:TextBox runat="server" ID="txt_EndDate" Width="80px"  onclick="jskitDateSelector.open(this,event)"></asp:TextBox>
                </td>
            </tr>
         </table>
    </fieldset>
    <div class="action_bar">
        <asp:Button ID="btn_Query" runat="server" Text="查询" onclick="btn_Query_Click" />
    </div>
    <fieldset>
        <legend>日志列表</legend>
        <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="false" CssClass="GridView"
            DataKeyNames="LogKey" AllowPaging="True" PageSize="20" 
            PagerSettings-Mode="Numeric" onpageindexchanging="gvList_PageIndexChanging">
            <Columns>
                <asp:BoundField DataField="TypeName" HeaderText="类型" ControlStyle-Width="30px" />
                <asp:BoundField DataField="Operator" HeaderText="操作者" />
                <asp:TemplateField HeaderText="信息">
                    <ItemTemplate>
                        <div style="font-size:11px;color:#008800;"><%# DataBinder.Eval(Container, "DataItem.LogDate")%></div>
                        <div style="font-size:11px;color:#6699cc;"><b><%# DataBinder.Eval(Container, "DataItem.FromIp")%></b></div>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="内容">
                    <ItemTemplate>
                        <div style="color:#ff0000;"><%# DataBinder.Eval(Container, "DataItem.Content")%></div>
                        <div style="font-size:10px;color:#666666;"><%# DataBinder.Eval(Container, "DataItem.Url")%></div>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerTemplate>
                <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="First"></asp:LinkButton>
                <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                <asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1)  + "页/共" + (((GridView)Container.NamingContainer).PageCount) + "页" %> '></asp:Label>
                <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Last"></asp:LinkButton>
            </PagerTemplate>
            <HeaderStyle CssClass="GridViewHeader" />
            <RowStyle CssClass="GridViewRow" />
            <FooterStyle CssClass="GirdViewFooter" />
            <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
            <PagerStyle CssClass="GridViewPager" />
            <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
            <EmptyDataTemplate>
                没有可用的数据</EmptyDataTemplate>
        </asp:GridView>
    </fieldset>
</asp:Content>
